//
//  M4InfosBackAlertView.swift
//  M4
//
//  Created by YuChuang on 2024/8/9.
//

import UIKit

class M4InfosBackAlertView: UIView {
    
    @IBOutlet weak var M4BackTitle: UILabel!
    
    @IBOutlet weak var M4BackContinuaButton: UIButton!
    
    @IBOutlet weak var M4BackQuitClick: UIButton!
    
    
    var M4QuitBlock: (() -> Void)?
    
    var M4ContinuaBlock: (() -> Void)?

    override func awakeFromNib() {
        self.frame = CGRect(x: 0, y: 0, width: M4ScreenWidth, height: M4ScreenHeight)
    }
    
    func M4BackAlertUI(title: String, containuaText: String, quitText: String) {
        M4BackTitle.text = title
        M4BackContinuaButton.setTitle(containuaText, for: .normal)
        M4BackQuitClick.setTitle(quitText, for: .normal)
    }
    
    @IBAction func M4ContinuaClick(_ sender: UIButton) {
        self.M4AlertViewHidden()
        M4ContinuaBlock?()
    }
    
    @IBAction func M4QuitClick(_ sender: UIButton) {
        self.M4AlertViewHidden()
        M4QuitBlock?()
    }
    
    
}
